#include <iostream>
#include <pthread.h>
#include <cstdlib>
#include <vector>
#include <semaphore.h>


class RingQueue
{
  private:
    std::vector<int> _array;//数组用于实现环形队列
    int _front;//写指针
    int _rear;//都指针
    int _capacity;

    sem_t _sem_idle;//对空闲空间进行计数
    sem_t _sem_data;//对写入数据空间进行计数

    sem_t _sem_lock;//实现互斥锁
  public:
    RingQueue(int cap=_capacity):_capacity(cap);
    {
      sem_init(&_sem_idle,0,);
    }
    ~RingQueue()
    {

    }
};

int main()
{
  return 0;
}

